import requests
from urllib.parse import parse_qs, urlparse

# 拷贝整体地址过来
url = 'subl://open?url=file://D:%5Cgit%5Cxiongcai_web%5Cmodules%5Cmobile%5Csrc%5CController%5CContent%5CParkController.php&line=0'

url2 = "subl://open?url=file://D:/git/xiongcai_web/resources/views/app.blade.php&line=0"

print(url.count('subl://open'))

# 解析URL
o = urlparse(url)

# 将请求参数部分转化为 字典格式
params = parse_qs(o.query)

print(params)

url2 = url2.replace('subl://open?url=file://', '?file=')

print(url2)


# 解析URL
o = urlparse(url2)

# 将请求参数部分转化为 字典格式
params = parse_qs(o.query)
print(params)
